{{ extend "layout.html" }}

{{ block content }}

	{{ if auth.user: }}
		{{ if auth.has_membership('Admin', auth.user.id): }}
			<div style="float: right;">
				<a href="{{=URL('default', 'make_featured', args=plugin.name)}}"><img src="{{=URL('static', '16-circle-blue-check_16x16.png')}}" title="make featured" /></a>
				<a href="{{=URL('default', 'remove_featured', args=plugin.name)}}"><img src="{{=URL('static', '16-circle-blue-remove_16x16.png')}}" title="remove featured" /></a>
			</div>
		{{ pass }}
	{{ pass }}
	
	<h2>{{=plugin.name}}</h2>
	
	<a class="download" href="{{=URL('default', 'download', args=plugin.file)}}">
		<button>Download Version {{=plugin.version}}</button>
		<small>{{=plugin.modified_on.strftime(" %a %b %d %Y %I:%M %p")}}</small>
	</a>
	
	{{ if plugin.demo_approved: }}
		<a class="demo" href="{{=Plugin.get_demo_url(plugin)}}">
			<button>Demo</button>
		</a>
	{{ pass }}
	
	<p>Category: {{=plugin.category}}</p>
	<p>License: {{=plugin.license}}</p>
	<p>Author: {{=plugin.created_by.username}}</p>
	
	
	<p>{{=plugin.short_description}}</p>
	<p>{{=plugin.description}}</p>
	
	<img id="screenshot" src="{{=URL('default', 'download', args=plugin.screenshot)}}" />
	
{{ end }}